/* eslint-disable no-unused-vars */
/* eslint-disable no-console */
import Vue from 'vue'
import Router from 'vue-router';

import Home from '@pag/home/Home.vue'
import My from '@pag/my/My.vue'
import City from '@pag/city/City.vue'

Vue.use(Router);
const router = new Router({

    routes: [{
            path: '/',
            name: 'Home',
            component: Home
        },
        {
            path: '/city',
            name: 'City',
            component: City
        }
    ]
})

// router 实例的钩子函数
router.beforeEach((to, from, next) => {

    console.log(to);
    console.log(from);

    next();
});

export default router;